<%
    for (var i = 0; i < dataTypeList.length; i++) {
        dataTypeList[i] = dataTypeList[i].replace('int','number')
    }
    keyType = keyType.replace('int','number')
    function getTypeWithIndex(index){
        var ret = ""
        for (var i = index; i < dataTypeList.length; i++) {
            ret += "Map<" + dataTypeList[i] +","
        }
        ret += keyType
        for (var i = index; i < dataTypeList.length; i++) {
            ret += ">"
        }
        return ret
    }
    function getFuncParam(){
        var ret = []
        for (var i = 0; i < dataNameList.length; i++) {
            ret.push( dataNameList[i] + " : " + dataTypeList[i])
        }
        return ret.join(",")
    }

%>
//#region  <%= methodName %>ComplexIndex
    public _<%= initMethodName %>ComplexIndexDict : <%- getTypeWithIndex(0) %>;

    private <%= initMethodName %>()
    {
        this._<%= initMethodName %>ComplexIndexDict = this._headJsonData.<%= keyName %>ComplexIndex;
        this._headJsonData.<%= keyName %>ComplexIndex = null
    }

    public <%= methodName %>(<%=getFuncParam() %>) :  <%= className %>
    {

        var ret = this._<%= initMethodName %>ComplexIndexDict;
<%for (var i = 0; i < dataTypeList.length - 1; i++) { %>
        var key<%= i %> = <%= dataNameList[i] %>
        var ret<%= i %> :  <%= getTypeWithIndex(i+1) %> = null;
<% var tempKey; if (i === 0) tempKey = ""; else tempKey = i-1%>
        if (!ret<%= tempKey%>.has(key<%= i %>))
        {
            return null
        }else{
            ret<%= i %> = ret<%= tempKey%>.get(key<%=i %>)
        }
<%}%>
<%i = dataTypeList.length - 1%>
        var key<%= i %> = <%= dataNameList[i] %>
        var configKey = null;
        if (!ret<%= i - 1%>.has(key<%= i %>))
        {
            return null
        }else{
            configKey = ret<%= tempKey%>.get(key<%=i %>)
        }
        return this.GetConfigByKey(configKey);
    }
//#endregion